import {
  axios,
  get,
  post,
  patch,
  Delete
} from './request';

// 所有的接口封装这里  promise (async+await )
// 服务层 提供接口 提供数据
export const ajax = { 
  test: (params) => get("/test", params),
  findUser: (params) => get("/users", params),//查询
  addUser: (params) => post("/users", params),//添加

  // 发送验证码  http://47.104.209.44:3333/
  sendCaptcha: params => get('http://47.104.209.44:3333/captcha/sent', params),

  //校验验证码
  verifyCaptcha: params => get('http://47.104.209.44:3333/captcha/verify', params),

  // 卖座接口   跨域
  getMaiData: (params, headers) => get("https://m.maizuo.com/gateway", params, headers)
  //headers跨域传的传输

}
